package com.wnxy.admin.common.handler;

import com.wnxy.admin.common.IErrorCode;

/*
*  业务异常枚举类
* */
public enum BusinessEnum implements IErrorCode {
    RULE_IS_OCCUPIED(1000, "当前规则已启用"),
    RULES_CANNOT_BE_DISABLED(1001, "当前规则不可禁用"),
    SETTINGS_CANNOT_BE_DISABLED(1010, "当前设置不可禁用"),

    THE_TASK_IS_NOT_PUBLISHED(1020, "任务未发布"),
    THE_TASK_HAS_BEEN_PROCESSED(1021, "任务已进入处理流程"),
    RISK_LEVEL_IS_TOO_HIGH(1022, "危险等级高于安全阈值"),
    TASK_IS_NOT_BEING_PROCESSED(1023, "任务不在处理中"),
    TASK_NOT_COMPLETED(1024, "任务未完成"),
    MISSION_ACCOMPLISHED(1025, "任务已处理"),
    MISSION_LEVEL_DISCREPANCY(1026, "安全阈值外的任务由系统自动发布"),
    TASK_HAS_BEEN_RELEASED(1027, "任务已发布"),
    IMAGE_DETECTION_ANOMALY(1030, "图片检测失败"),
    MAILBOX_ALREADY_EXISTS(1040, "邮箱已存在"),
    UNABLE_TO_ADD_THIS_STATUS(1041, "无法添加此状态"),
    PERSONNEL_IN_MAINTENANCE_MODE(1042, "运维人员正处于维修状态"),
    UNABLE_TO_DELETE_NON_DISABLED_PEOPLE(1043, "运维人员已启用"),
    FILE_UPLOAD_FAILED(1050, "上传失败"),
    END_DATE_NOT_UPLOADED(1051, "未上传结束日期"),
    TIME_ERROR(1052, "时间不符合宇宙第一定律"),
    IMPORT_FAILED(1053, "导入失败"),
    INVALID_FILE_TYPE(1054, "文件类型不匹配"),
    IMAGE_PATH_IS_WRONG(1055, "图片路径错误"),
    ONLY_JPG_OR_PNG_CAN_BE_UPLOADED(1056, "图片格式错误 JPG/PNG"),
    FILE_SIZE_EXCEEDED_LIMIT(1057, "图片大小超出限制 1MB"),
    ACCOUNT_EXISTS(2000,"账号已存在！"),
    PHONE_EXISTS(2001,"手机号码已使用！"),
    CODE_EXISTS(2002,"编号已存在！"),
    ROLE_EXISTS(2003,"角色已存在！"),
    LOGIN_ERROR(2004,"账号或密码错误！"),

    VALICODE_IS_NULL(2005,"验证码为空！"),
    IDS_IS_NULL(2007,"没有授权员工！"),
    VALICODE_IS_ERROR(2006,"验证码错误！"),
    VALICODE_EXPIRED(2008,"验证码已过期！"),

    CARNUM_OR_CARVIM_REPEAT(3001,"添加失败！车牌号或车架号重复，请重新添加"),
    CARNUM_OR_CARVIM_IS_NUll(3002,"添加失败！车牌号或车架号为空，请重新添加"),
    ORDER_UNPAID_OR_NOT_COMPLETED(3003,"订单未付款或未完成"),
    STATE_IS_RESERVATION(3004,"操作失败，该订单正在预约中"),
    STATE_IS_CHARGING(3005,"操作失败，充电桩已经被预约"),
    RESERVATION_IS_RE(3006,"操作失败，已存在尚未结束预约单"),
    IMAGE_IS_NULL(3007,"警告，尚未上传图片,该报错不影响车辆上传"),
    TOKEN_IS_NULL(3008,"token是空的！请重新登录"),

    ORDER_CREATE_FAIL(4001, "订单生成失败"),

    FILE_IS_EMPTY(5001,"文件为空"),

    ORDER_CARD_PAY_FAIL(4002, "支付失败"),
    CREATE_ORDER_FAIL(4003, "生成失败,有未完成业务:("),
    ORDER_NO_FIND(4004, "订单失效,请联系管理员:("),
    ORDER_DROP_FAIL( 4005,"订单删除失败:("),
    ;
    private Integer code;
    private String msg;

    BusinessEnum() {
    }

   BusinessEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
